//Нет такого пакета JavaFX179Labs.src.javafx179labs.gusev.lab1;
package javafx179labs.gusev.lab1;

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
import javafx.scene.shape.Rectangle;
import javafx.scene.shape.Polygon;
import javafx.scene.shape.Ellipse;
import javafx.scene.shape.Arc;
import javafx.scene.shape.ArcType;
import javafx.scene.shape.Line;
import javafx.scene.effect.DropShadow;
import javafx.scene.effect.MotionBlur;
import javafx.scene.effect.PerspectiveTransform;
import javafx.scene.effect.InnerShadow;
import javafx.scene.effect.Lighting;
import javafx.scene.effect.Reflection;
import javafx.scene.effect.Shadow;
import javafx.scene.transform.Rotate;
import javafx.scene.transform.Shear;
import javafx.scene.transform.Scale;

Stage
{
    title: "Окошко"
    width: 400
    height: 600
    scene: Scene
    {
        content: [
        Text
        {
            font : Font
            {
                size : 20
            }
            x: 10
            y: 30
            content: "Графические объекты"
        }

        Circle
        {
            centerX: 30
            centerY: 80
            radius: 20
        }

        Rectangle
        {
            x: 60
            y: 60
            width: 40
            height: 40
            fill: Color.RED
        }

        Polygon
        {
            points : [ 110,100, 130,60, 150,100 ]
            fill: Color.YELLOW
        }

        Ellipse
        {
            centerX: 180
            centerY: 80
            radiusX: 20
            radiusY: 10
            fill: Color.GREEN
        }

        Arc
        {
            centerX: 230
            centerY: 100
            radiusX: 20
            radiusY: 40
            startAngle: 0
            length: 180
            type: ArcType.OPEN
            fill: Color.MAGENTA
        }

        Line
        {
            startX: 260
            startY: 60
            endX: 300
            endY: 100
            strokeWidth: 5
            stroke: Color.BLACK
        }

        Line
        {
            startX: 260
            startY: 100
            endX: 300
            endY: 60
            strokeWidth: 5
            stroke: Color.BLACK
        }

        Text
        {
            font: Font
            {
                size: 10
            }
            x: 20
            y: 115
            content: "круг"
        }

        Text
        {
            font: Font
            {
                size: 10
            }
            x: 60
            y: 115
            fill: Color.RED
            content: "квадрат"
        }

        Text
        {
            font: Font
            {
                size: 10
            }
            x: 110
            y: 115
            fill: Color.YELLOW
            content: "полигон"
        }

        Text
        {
            font: Font
            {
                size: 10
            }
            x: 163
            y: 115
            fill: Color.GREEN
            content: "эллипс"
        }

        Text
        {
            font: Font
            {
                size: 10
            }
            x: 218
            y: 115
            fill: Color.MAGENTA
            content: "арка"
        }

        Text
        {
            font: Font
            {
                size: 10
            }
            x: 260
            y: 115
            content: "2 линии"
        }

        Line
        {
            startX: 0
            startY: 130
            endX: 400
            endY: 130
        }

        Text
        {
            font: Font
            {
                size: 20
            }
            x: 10
            y: 170
            content: "Эффекты"
        }

        Text
        {
            font: Font
            {
                size: 25
            }
            effect:DropShadow
            {
                offsetX: 5
                offsetY: 5
                color: Color.BLACK
                radius: 10
            }
            fill: Color.BLACK
            x: 10
            y: 200
            content: "Тень"
        }

        Text
        {
            font: Font
            {
                size: 25
            }
            effect: MotionBlur
            {
                angle: 45
                radius: 10
            }
            x: 100
            y: 200
            content: "Блюр"
        }

        Text
        {
            effect: PerspectiveTransform
            {
                llx: 250.0
                lly: 225.0
                lrx: 350.0
                lry: 225.0
                ulx: 200.0
                uly: 150.0
                urx: 400.0
                ury: 150.0
            }
            content: "Трансформация"
        }

        Circle
        {
            effect: InnerShadow
            {
                choke: 10 //Spread must be in the range [0,1]
                offsetX: 1.0
                offsetY: 10
                radius: 10
                color: Color.BLACK
            }
            centerX: 50
            centerY: 300
            radius: 40
            fill: Color.YELLOW
        }

        Rectangle
        {
            effect: Lighting
            {
                diffuseConstant: 10 //Diffuse constant must be in the range [0,2]
                specularConstant: 10 //Specular constant must be in the range [0,2]
                specularExponent: 10
                surfaceScale: 15 //Surface scale must be in the range [0,10]
            }
            x: 100
            y: 250
            height: 100
            width: 50
        }

        Ellipse
        {
            effect: Reflection
            {
                fraction: 0.75
                topOffset: 0.0
                topOpacity: 0.5
                bottomOpacity: 0.0
            }
            centerX: 200
            centerY: 250
            radiusX: 30
            radiusY: 50
        }

        Polygon
        {
            effect: Shadow
            {
                color: Color.BLACK
                radius: 15
            }
            points: [ 250,300, 300,250, 300,350 ]
            fill: Color.BLACK
        }

        Line
        {
            startX: 0
            startY: 370
            endX: 400
            endY: 370
        }

        Text
        {
            font: Font
            {
                size: 20
            }
            x: 10
            y: 400
            content: "Трансформации"
        }

        Text
        {
            font: Font
            {
                size: 15
            }
            transforms: Rotate
            {
                pivotX : 0.0
                pivotY : 0.0
                angle: 30.0
            }
            x: 220
            y: 360
            content: "поворот"
        }

        Text
        {
            font: Font
            {
                size: 15
            }
            transforms: Scale
            {
                x : 1.6
                y : 1.0
            }
            x: 50
            y: 440
            content: "вытягивание"
        }

        Text
        {
            font: Font
            {
                size: 15
            }
            transforms: Shear
            {
                x: 0.7
                y: 0.3
            }
            x: -30
            y: 430
            content: "обрезание"
        }

        Circle
        {
            transforms: Scale
            {
                x : 1.3
                y : 1.0
            }
            centerX: 50
            centerY: 500
            radius: 30
        }

        Rectangle
        {
            transforms: Rotate
            {
                pivotX : 0.0
                pivotY : 0.0
                angle: 30.0
            }
            x: 400
            y: 320
            width: 50
            height: 40
        }

        ]
    }
}